class_name AudioSystem
extends BaseSystem


@export var bgm_vol_db:float
@export var bgm_audio_bus_poss:Array[int]
@export var audio_vol_db:float
@export var audio_audio_bus_poss:Array[int]

func set_bgm_vol(vol_db:float):
	for pos in bgm_audio_bus_poss:
		if AudioServer.bus_count > pos:
			AudioServer.set_bus_volume_db(pos,vol_db)
func set_audio_vol(vol_db:float):
	for pos in audio_audio_bus_poss:
		if AudioServer.bus_count > pos:
			AudioServer.set_bus_volume_db(pos,vol_db)
func set_bgm_mute(enable:bool):
	for pos in bgm_audio_bus_poss:		
		if AudioServer.bus_count > pos:
			AudioServer.set_bus_mute(pos,enable)
func set_audio_mute(enable:bool):
	for pos in audio_audio_bus_poss:		
		if AudioServer.bus_count > pos:
			AudioServer.set_bus_mute(pos,enable)
			
func init_system():
	super.init_system()
